# This file is based on a file included with the standard distribution of ircII # It contains useful aliases for Snak. The aliases allows you to reduce the # amount of typing. # basical and action are automatically loaded into each connection # when the connection is opened # Lines with '#' are comments that are not executed # The format of a simple alias definition is simply the word "alias" followed by the name # you give the new alias, and the actual contents of the alias. # For more elaborate aliases, consisting of multiple lines of commands you need to put # brackets around the commands like this: # alias elaborateAlias { # command1 # command 2 # } # See the oops alias in this file for an example of a multi line alias. # To run the alias (and any other command) type / and any necessary parameters # and press enter in an input field. alias F5 echo testing function keys alias F6 whois url alias Finger CTCP $0 FINGER alias Version CTCP $0 VERSION alias Time CTCP $0 TIME alias Userinfo CTCP $0 USERINFO alias Clientinfo CTCP $0 CLIENTINFO alias Chat DCC CHAT $0- alias DQuery DCC CHAT $0- alias tn mode $C +tn alias op mode $C +ooo alias deop mode $C -ooo alias ban mode $C +bbb alias ChannelClick query $E alias ConsoleClick msg $E $* alias sslserver server -ssl alias m msg alias i invite $0 $C alias a away alias c channel alias ch channel alias e exit alias h help alias j join alias l list alias log set log alias n names alias s signoff alias t topic alias w whois alias q query alias play sound alias chop mo +o alias unchop mo -o $* alias mo mode $C $* alias k kick $C alias wdetected whois $D alias umode mode $N alias mr msg $, $* alias ma msg $. $* alias wa whois $. alias ia invite $. $C alias no notice alias nf notify alias la lastlog alias " quote alias unalias alias -$* alias shields_up ignore $, msgs notices alias protect mode $C +ni alias unprotect mode $C -ni alias chops who $C -chop alias wjoin j $0 alias talkto query $0 alias oops { ^assign alias.oops $B msg $. Sorry, that wasn't meant for you. msg $0 $alias.oops } alias dmsg msg =$0 $1- alias dquery /query =$0 # Functions for server control. # They only work if you are a server operator. alias wo wallops alias ow operwall # utility function that returns the nick part of a nick!userhost string alias nickonly {@ FUNCTION_RETURN = left($index(! $0) $0)} # This lets you assign aliases for peoples nicknames. # For example, of you do: /assign BC BigCheese # Then you can do: /amsg BC Hi there! alias amsg { if ( [$($0)] ) { ${K}${K}msg $($0) $1- } { ${K}${K}msg $0 $1- } } alias aquery { if ( [$($0)] ) { ${K}${K}query $($0) } { ${K}${K}query $0- } } # The repeatcmd and listtest aliases show how you can repeat an action a number of times # Use a simply while loop to repeat a command. # $0 is the number of times to do something # $1 is the string with the action to perform # Usage "/repeatcmd 5 echo Snak is a nice program" alias repeatcmd { @ rep.cnt = [$0] while ( rep.cnt > 0 ) { $1- @rep.cnt = rep.cnt - 1 } ^assign -rep.cnt } # This steps over all numbered items in the array and echoes their value alias listtest { assign blue.1 one assign blue.2 two assign blue.3 three foreach blue ii { echo $ii $blue[$ii] } } # The $me variable is a synonum for $N that holds your nick assign me $N # these aliases illustrate how to use color in messages. In addition to $color(string), there is also $bold(), $italic(), $underline(), and $plain() alias BUY ME $color(9,3)----$color(0,3)buys $color(0,3) $0 $color(15,3) @ $color(0,3) $1-15$color(9,3)---- alias SELL ME $color(12,2)----$color(0,2)sells $color(0,2) $0 $color(15,2) @ $color(0,2) $1-15 $color(12,2)--- alias SHORT ME $color(4,5)----$color(0,5)shorts $color(0,5) $0 $color(15,5) @ $color(0,5) $1-15 $color(4,5)--- alias COVER ME $color(12,2)----$color(0,2)covers $color(0,2) $0 $color(15,2) @ $color(0,2) $1-15 $color(12,2)---- alias COLORTEST ME $color(12,2) COLOR $bold()BOLD COLOR $underline() UNDERLINE BOLD COLOR $plain() PLAIN $bold() PLAIN BOLD # This snippet is an example of a hook for a numbered command. The server sends topic information in a # numbered message 332. If the topic is not work safe or otherwise inappropriate you can # block the numbered message. This empty script will simply swallow it. #on ^332 * { #}